#include "deviceSelect.h"

#ifdef __DEVICE_EMULATION__
int chooseLargestGPU(bool verbose){}
#else
int chooseLargestGPU(bool verbose) {
	cudaDeviceProp deviceProp;
	int devID = cutGetMaxGflopsDeviceId(); // Pick the device with highest Gflops/s
	cutilSafeCallNoSync( cudaSetDevice(devID) );
	cutilSafeCallNoSync( cudaGetDeviceProperties(&deviceProp, devID));
	if(verbose) 
		printf("> Using CUDA device [%d]: %s\n"
			   "> GPU device has %d Multi-Processors, SM %d.%d compute capabilities.\n"
			   //"> maxTexture1D:%d, maxTexture2D:%dx%d\n"
				,devID, deviceProp.name,
				deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor
				/*,deviceProp.maxTexture1D, deviceProp.maxTexture2D[0],deviceProp.maxTexture2D[1]*/);
	return devID;
}
#endif